lapop12 = readRDS('data/lapop12.rds')

#appendix b2 (drop/recode march 26)

lapop12 = lapop12 %>%  
  mutate(trial2 = as.numeric(daten >= 326))

#social cleanse, recode march 26 as treated
b2.01 = lm_robust(soc.cl_bin ~ trial2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.02 = lm_robust(soc.cl_bin ~ trial2 + I(trend-1) + weekend + q1 + q2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

#social cleanse, mark march 26 as missing
b2.03 = lm_robust(soc.cl_bin ~ trial, 
                  data= subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.04 = lm_robust(soc.cl_bin ~ trial + trend + weekend + q1 + q2, 
                  data = subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

#torture, recode march 26 as treated
b2.05 = lm_robust(torture_bin ~ trial2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.06 = lm_robust(torture_bin ~ trial2 + I(trend-1) + weekend + q1 + q2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')


#torture, mark march 26 as missing
b2.07 = lm_robust(torture_bin ~ trial, 
                  data= subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.08 = lm_robust(torture_bin ~ trial + trend + weekend + q1 + q2, 
                  data = subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

#fair trial, recode march 26 as treated
b2.09 = lm_robust(fair_trial ~ trial2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.10 = lm_robust(fair_trial ~ trial2 + I(trend-1) + weekend + q1 + q2, 
                  data = lapop12, 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')


#fair trial, mark march 26 as missing
b2.11 = lm_robust(fair_trial ~ trial, 
                  data= subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')

b2.12 = lm_robust(fair_trial ~ trial + trend + weekend + q1 + q2, 
                  data = subset(lapop12, daten != 326), 
                  fixed_effects = estratopri + estratosec, 
                  se_type = 'stata')


texreg::texreg(list(b2.01, b2.02, b2.03, b2.04, b2.05, b2.06, b2.07, b2.08, b2.09, b2.10, b2.11, b2.12), include.ci = F, 
               stars = c(.001, .01, .05, .1), 
               symbol = '\\dagger')

